package com.ypx.ec.ware.dao;

import com.ypx.ec.ware.entity.WareSkuEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 商品库存
 * 
 * @author yepinxi
 * @email 1554039596@qq.com
 * @date 2022-03-10 17:03:50
 */
@Mapper
public interface WareSkuDao extends BaseMapper<WareSkuEntity> {

    void addSku(Long skuId, Long wareId, Integer stock);

    Long lockSkuStock(@Param("skuId") Long skuId, @Param("wareId") Long wareId, @Param("num") Integer num);

    void unlockStock(Long skuId, Long wareId, Integer num);
}
